package com.gzbsoft.sc.modules.sys.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.ebean.annotation.DbComment;
import io.ebean.annotation.DocEmbedded;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@Entity
@Table(name = "jx_good_standard_detail")
@DbComment("商品参数详情表")
public class JxGoodStandardDetail extends BaseEntity {
    @DocEmbedded(doc = "id, title")
    @JsonIgnore
    @OneToOne
    @JoinColumn(name = "jx_good_id")
    private JxGood good;
    @DbComment("名称")
    private String name;
    @DbComment("单位")
    private String unit;
    @DbComment("值")
    private String value;
    @DocEmbedded(doc = "id")
    @JsonIgnore
    @OneToOne
    @JoinColumn(name = "jx_good_sku_id")
    private JxGoodSku sku;
    @Override
    public String toString() {
        return "JxGoodStandardDetail{" +
                "good=" + good +
                ", name='" + name + '\'' +
                ", unit='" + unit + '\'' +
                ", value='" + value + '\'' +
                ", sku=" + sku +
                ", id=" + id +
                '}';
    }
}
